
package com.gxa.autoparts.core.common;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;



/**
 * 商品表
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@Document( indexName= "goodsvo")
public class GoodsVo implements Serializable {

  @Id
  @Field(type = FieldType.Long)
  private Long id;

  @Field(type = FieldType.Keyword)
  private String name;

  // 二级分类id
  @Field(type = FieldType.Long)
  private Long typeId;

  @Field(type = FieldType.Boolean)
  private Boolean state;

  @Field(type = FieldType.Text)
  private String img;

  @Field(type = FieldType.Text)
  private String detail;

  @Field(type = FieldType.Date)
  private Date updateTime;

  //售价
  @Field(type = FieldType.Double)
  private Double salePrice;

  //s市场价
  @Field(type = FieldType.Double)
  private Double remarkPrice;

  //销售统计
  @Field(type = FieldType.Integer)
  private Integer saleCount;

}



